package com.lyf.juc.practice.datastructure;

import org.junit.Test;

import java.util.concurrent.BlockingDeque;
import java.util.concurrent.LinkedBlockingDeque;

/**
 * <P>
 *     关于阻塞队列的作用：https://blog.csdn.net/wcc178399/article/details/106663678
 *     <p>  → 当队列为空或满时，对拿或添加的程序进行阻塞，无需自行关心</p>
 *
 * </P>
 *
 * <pre>
 *     hello
 * </pre>
 *
 * <h1>OK Head</h1>
 * @author LYF
 * @date 2022/6/23
 */
public class BlockedQueueTests {
    @Test
    public void test1(){
        /*
        1.层级结构
        public class LinkedBlockingDeque<E>
    extends AbstractQueue<E>
    implements BlockingDeque<E>, java.io.Serializable

        2.存储结构

        {@link LinkedBlockingDeque}
        概括：双端链表队列 + ReentrantLock --(NotEmpty,NotFull--Condition)
        理解、学习：Lock的使用

         */
        BlockingDeque
                blockingDeque = new LinkedBlockingDeque();

    }
}
